//
// Created by fu on 2024-07-27.
//

#ifndef GLFW01_MATRIX_H
#define GLFW01_MATRIX_H

#include <iostream>
#include <string>
#include <cuda_runtime.h>
#include <device_launch_parameters.h>

#if _WIN32
#define GLFW_MATH_FUNC_EXPORT __declspec(dllexport)
#else
#define GLFW_MATH_FUNC_EXPORT __attribute__((visibility("default")))
#endif

#ifdef __cplusplus
extern "C" {
#endif

GLFW_MATH_FUNC_EXPORT void mat4x4_mul_cpu(const int *a, const int *b, int *out);

GLFW_MATH_FUNC_EXPORT void mat4x4_mul_gpu(const int *a, const int *b, int *out, unsigned int arraySize);

GLFW_MATH_FUNC_EXPORT void im2col_cpu(float* data_im, int channels, int height, int width,
    int ksize, int stride, int pad, float* data_col);

GLFW_MATH_FUNC_EXPORT int cmat_gpu(const int *in, const int len, int *out);

GLFW_MATH_FUNC_EXPORT int cmat_free_gpu(int *ptr);

GLFW_MATH_FUNC_EXPORT int cmat_mul_gpu();

GLFW_MATH_FUNC_EXPORT int conv_gpu();

#ifdef __cplusplus
};
#endif




#endif //GLFW01_MATRIX_H
